package com.hy.service;

import com.hy.utils.HY_Result;
import me.zhyd.oauth.model.AuthCallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 第三方登录 - 服务
 * @author HUAYI
 * @since 2020-12-27
 */
@FeignClient(name = "hy-gateway",contextId = "oauth")
public interface LoginOauthService {

    /**
     * 授权请求地址
     * @param source
     * @return
     */
    @RequestMapping("hy-frontuser-provider/oauth/render/{source}")
    HY_Result renderAuth(@PathVariable String source);

    /**
     * 授权回调地址
     * @param source
     * @param callback
     * @return
     */
    @RequestMapping("hy-frontuser-provider/oauth/callback/{source}")
    HY_Result login(@PathVariable String source, AuthCallback callback);

}
